package com.y7net.snakeplus;

import java.io.Serializable;

public class Cell implements Serializable {
    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	public int x;
    public int y;
    public int type;
    public int extraType;
    public int direction;
    public String imgSrc;
    public int score = 1;
    public long stayTime;
    public int bId; //bubble view id
    public Bubble bubble;

    public Cell(int newX, int newY){
        x = newX;
        y = newY;
    }
    
    public Cell(int newX, int newY, int type) {
    	this(newX, newY);
        this.type = type;
    }
    
    public Cell(int newX, int newY, int type, int extraType, String  imgSrc) {
    	this(newX, newY, type);
        this.extraType = extraType;
        this.imgSrc = imgSrc;
    }
    
    public Cell(int newX, int newY, int type, int extraType, String  imgSrc, int direct) {
    	this(newX, newY, type, extraType, imgSrc);
        direction = direct;
    }

    public boolean equals(Cell other) {
        if (x == other.x && y == other.y) {
            return true;
        }
        return false;
    }

    @Override
    public String toString() {
        return "Cell: [" + x + "," + y + "," + type + "," + extraType + "," + direction + "]";
    }
}
